package cn.com.connext.scrm.repository.master;


import cn.com.connext.scrm.domain.master.DwaGetCoupon;
import cn.com.connext.scrm.domain.master.Task;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface DwaGetCouponRepository extends JpaRepository<DwaGetCoupon, String>, JpaSpecificationExecutor {

    List<DwaGetCoupon> findByActivityIdAndUnionId(String activityId, String unionId);

    DwaGetCoupon findByUnionId(String unionId);

    /**
     * 根据用户ID查询
     *
     * @param unionId
     * @return
     */
    List<DwaGetCoupon> findListByUnionId(String unionId);
}
